import { defHttp } from '@/utils/http/axios';

const prefix = '/demand/cgcjDemandOrder'

enum Api {
    list = prefix + '/list',
    create = prefix + '/create',
    update = prefix + '/update',
    remove = prefix + '/delete',
    detail = prefix + '/detail',
}

/**
 * 列表接口
 * @param params
 */
export const list = (params) =>
  defHttp.get({url: Api.list, params});

/**
 * 新增接口
 * @param params
 */
export const create = (params) =>
  defHttp.post({url: Api.create, params});

/**
 * 更新接口
 * @param params
 */
export const update = (params) =>
  defHttp.post({url: Api.update, params});

/**
 * 删除接口
 * @param params
 */
export const remove = (params) =>
  defHttp.post({url: Api.remove, params});

/**
 * 详情接口
 * @param params
 */
export const detail = (params) =>
  defHttp.get({url: Api.detail, params});